/**
 * Created by JustinChow on 2016/11/7.
 */

"use strict";

const Util = require("util");
const GameObject = require("./GameObject");

const StaticDropConfig = require("../Configs/Datas/Drop.json");

function Drop(objectId, owner, position, gameServer, staticId) {
    GameObject.apply(this, Array.prototype.slice.call(arguments));

    this.type = 3;
    this.staticId = staticId;

    this.staticConfig = this.loadConfig();

    this.time = 0;
    this.initCollision();
}
Util.inherits(Drop, GameObject);

module.exports = Drop;

Drop.prototype.sendUpdate = function () {
    return true;
};

Drop.prototype.onAdd = function () {

};

Drop.prototype.onRemove = function () {

};

Drop.prototype.move = function () {
    // Drop No Move
};

Drop.prototype.loadConfig = function () {
    if (!StaticDropConfig[this.staticId]) return {};
    return StaticDropConfig[this.staticId];
};
